#ifndef _EVENT_TYPE_H_
#define _EVENT_TYPE_H_

enum E_EVENT_TYPE {
	// misc
	EET_OK			= 100,
	EET_ERROR 		,	// followed by nothing.

	EET_PING 		,	// followed by a random string
					// to identify to ping message.

	EET_PONG 		,	// followed by the string following
					// the to-response ping message.

	// from client
	EET_REGISTER_USER	= 200,	// followed by the local ip address
					// and port of the client. 
					// We will store them with the 
					// global ip address of the client.

	EET_REGISTER_URL	,	// followed by an encoded url to register.

	EET_REQUEST_MIRROR	,	// followed by an encoded url to find mirror.

	EET_REQUEST_FRIEND	,	// followed by an encoded url to find friends.
					// a friend is some client having downloaded
					// the same url.
	
	// to client
	EET_RESPOND_REGISTER_USER	= 300,	// 
	EET_RESPOND_REGISTER_URL	, 
	EET_RESPOND_MIRROR	,	// followed by an url that request by the
					// client, which offer the same file as the
					// url sent by the client.
	
	EET_RESPOND_FRIEND	,		// followed by a client's global ip, local ip,
					// and upload port.
	
	EET_REQUEST_DOWNLOAD_URL	,	// from downloader to uploader
	EET_RESPOND_DOWNLOAD_URL	,	// from uploader to downloader

	EET_REQUEST_DOWNLOAD_SECTION,	// from downloader to uploader
	EET_RESPOND_DOWNLOAD_SECTION,	// from uploader to downloader

	EET_REQUEST_FILE_INFO,
	EET_RESPOND_FILE_INFO,
};

#endif // _EVENT_TYPE_H_
